<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.11.0.min.js"></script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>

<body>
上传图片
<form action="{:U('users/upload_user_img')}" method="post" enctype="multipart/form-data" >
<input type="file" name="user_img" id='user_img'/>
<input type="submit" value="提交"  >



</form>

<br /><br />
<hr />
邀请码
<form action="__URL__/check_h_code" method="post" >
<input type="text" name="h_code" id='h_code'/>
<input type="button" value="提交" onclick="ck()" >
<input type="text" id="cdcd" />

{___PUBLIC__}
</form>
<br /><br />
<hr />

昵称
<form action="{:U('users/edit_name')}" method="post" >
<input type="text" name="user_name" id='user_name'/>
<input type="submit" value="提交"  >

</form>
<script>
 function ck()
 {
     $.ajax({
             type: "POST",
             url: "__URL__/check_h_code",
             data: {h_code:$("#h_code").val()},
             dataType: "json",
             success: function(data){
                         $('#cdcd').val(data.data.h_code);   //清空resText里面的所有内容
                         alert(data);
                      }
         });
	}
</script>
</body>
</html>
